<template>
    <div>
      <h2>404</h2>
      <p><span>{{jumpTime}}</span>s后页面将跳转到首页</p>
    </div>
</template>

<script>
  export default {
    data () {
      return {
        jumpTime: 5
      }
    },
    mounted () {
      var _this = this;
      var timer = setInterval( function () {
        if(_this.jumpTime > 1){
          _this.jumpTime = _this.jumpTime - 1;
        }else{
          clearInterval(timer);
          _this.$router.push('/');
        }
      },1000)
    }
  }
</script>

<style>

</style>
